import st7789py as st7789
from machine import SPI,Pin,UART
import time,gc,os
from fbconsole import FBConsole
spi = SPI(1, baudrate=20000000, polarity=1, sck=Pin(4), mosi=Pin(5),miso=Pin(14))
lcd = st7789.ST7789(spi, 320, 240,
        reset=Pin(6, Pin.OUT),
        cs=Pin(15, Pin.OUT),
        dc=Pin(7, Pin.OUT),
        backlight=Pin(16, Pin.OUT),
        rotation=1)
# lcd.fill(st7789.RED)
# vcc 5V

print(12)
time.sleep(1)
# 
scr = FBConsole(lcd,st7789.color565(111, 0, 0),st7789.color565(242, 242, 242))
# # # time.sleep(0.5)
os.dupterm(scr)  


